<?php
/* Smarty version 3.1.30, created on 2018-05-01 13:29:53
  from "H:\PHP_Study\06-Smarty\smarty_test\tpl\smarty_test.tpl" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.30',
  'unifunc' => 'content_5ae7fb51b04c18_94703439',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '6189e0ae6612768c839706e7287b7a633ebf2f68' => 
    array (
      0 => 'H:\\PHP_Study\\06-Smarty\\smarty_test\\tpl\\smarty_test.tpl',
      1 => 1525152574,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:header.tpl' => 1,
  ),
),false)) {
function content_5ae7fb51b04c18_94703439 (Smarty_Internal_Template $_smarty_tpl) {
if (!is_callable('smarty_modifier_capitalize')) require_once 'H:\\PHP_Study\\06-Smarty\\smarty\\plugins\\modifier.capitalize.php';
if (!is_callable('smarty_modifier_date_format')) require_once 'H:\\PHP_Study\\06-Smarty\\smarty\\plugins\\modifier.date_format.php';
$_smarty_tpl->compiled->nocache_hash = '5061041685ae7fb4f4b0b55_45283241';
?>
输出显示文章标题：<?php echo $_smarty_tpl->tpl_vars['arr']->value['title'];?>
                       <br>
<hr>
输出数组中的内容：<?php echo $_smarty_tpl->tpl_vars['arr']->value['author'];?>
                      <br>
<hr>
输出并显示首字母大写：<?php echo smarty_modifier_capitalize($_smarty_tpl->tpl_vars['articletitle']->value);?>
     <br>
<hr>
输出当前时间：<?php echo $_smarty_tpl->tpl_vars['time']->value;?>
                                <br>
按照格式输出时间：<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['time']->value,"%H:%M:%S");?>
     <br>
指定格式输出时间：<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['time']->value,"%B %e, %Y");?>
    <br>
<hr>
当输出内容为空时，自动显示初始值：<?php echo (($tmp = @$_smarty_tpl->tpl_vars['value']->value)===null||$tmp==='' ? "no value" : $tmp);?>
 <br>
<hr>
转码URL：<?php echo rawurlencode($_smarty_tpl->tpl_vars['url']->value);?>

<hr>
小写转换：<?php echo mb_strtolower($_smarty_tpl->tpl_vars['articletitle']->value, 'UTF-8');?>
<br>
大写转换：<?php echo mb_strtoupper($_smarty_tpl->tpl_vars['articletitle']->value, 'UTF-8');?>
<br>
<hr>
自动转换换行符：<br>
<?php echo nl2br($_smarty_tpl->tpl_vars['articlecontent']->value);?>


<hr>
<hr>
<?php if ($_smarty_tpl->tpl_vars['score']->value > 90) {?>
    优秀
<?php } elseif ($_smarty_tpl->tpl_vars['score']->value > 60) {?>
    及格
<?php } else { ?>
    不及格
<?php }?>

<hr>
<hr>
Smarty中的section循环函数: <br>
<?php
$__section_list_0_saved = isset($_smarty_tpl->tpl_vars['__smarty_section_list']) ? $_smarty_tpl->tpl_vars['__smarty_section_list'] : false;
$__section_list_0_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['articlelist']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_list_0_total = $__section_list_0_loop;
$_smarty_tpl->tpl_vars['__smarty_section_list'] = new Smarty_Variable(array());
if ($__section_list_0_total != 0) {
for ($__section_list_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_list']->value['index'] = 0; $__section_list_0_iteration <= $__section_list_0_total; $__section_list_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_list']->value['index']++){
?>
    <?php echo $_smarty_tpl->tpl_vars['articlelist']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_list']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_list']->value['index'] : null)]['title'];?>

    <?php echo $_smarty_tpl->tpl_vars['articlelist']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_list']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_list']->value['index'] : null)]['author'];?>

    <?php echo $_smarty_tpl->tpl_vars['articlelist']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_list']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_list']->value['index'] : null)]['content'];?>

    <br>
    <?php }} else {
 ?>
    当前没有文章！！！！
<?php
}
if ($__section_list_0_saved) {
$_smarty_tpl->tpl_vars['__smarty_section_list'] = $__section_list_0_saved;
}
?>
<hr>
Smarty中的foreach循环函数: <br>
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['articlelist']->value, 'list');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['list']->value) {
?>
    <?php echo $_smarty_tpl->tpl_vars['list']->value['title'];?>

    <?php echo $_smarty_tpl->tpl_vars['list']->value['author'];?>

    <?php echo $_smarty_tpl->tpl_vars['list']->value['content'];?>

    <br>
    <?php
}
} else {
?>

    当前没有文章！！！！
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
?>

<hr>
foreach在Smarty3中的最新用法：<br>
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['articlelist']->value, 'list');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['list']->value) {
?>
    <?php echo $_smarty_tpl->tpl_vars['list']->value['title'];?>

    <?php echo $_smarty_tpl->tpl_vars['list']->value['author'];?>

    <?php echo $_smarty_tpl->tpl_vars['list']->value['content'];?>

    <br>
<?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
?>

<hr>
<hr>
引用模板文件：<br>
<?php $_smarty_tpl->_subTemplateRender("file:header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 9999, $_smarty_tpl->cache_lifetime, array('sitename'=>"德州学院"), 0, false);
?>

























<?php }
}
